package org.example.elm_xiangmu.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.elm_xiangmu.po.User;

@Mapper
public interface UserMapper {

    @Select("select * from user where userId = #{userId}")
    User getUserByIdByPass(String userId);

    @Select("select count(*) from user where userId = #{userId}")
    Integer getUserById(String userId);

    @Insert("insert into user (userId,password,userName,userSex) values (#{userId},#{password},#{userName},#{userSex})")
    Integer saveUser(User user);
}
